export default () => {
    let url = decodeURIComponent(window.location.href);
    // console.log("链接地址", url);
    let search = {};
    if (url.indexOf("?") > -1) {
        url.split("?").forEach(item => {
            if (item.indexOf("=") > -1) {
                item.split("#")[0].split("&").forEach(param => {
                    let arr = param.split("=");
                    search[arr[0]] = arr[1];
                });
            }
        });
    }
    search.sessionId ? 
        localStorage.setItem("sessionId", search.sessionId) :
            localStorage.removeItem("sessionId");
            console.log(search,localStorage.getItem('sessionId'),'sessionIdsessionIdsessionIdsessionId')
    return search;
}